package mi.payment.admin.pay88;

import org.ksoap2.serialization.KvmSerializable;
import org.ksoap2.serialization.PropertyInfo;

import java.util.Hashtable;

public class ClientRequestModel implements KvmSerializable {

    public String ActionType;

    public String Amount;
    public String BackendURL;
    public String BarcodeNo;

    public String CCCId;
    public String CCCOriTokenId;
    public String CCMonth;
    public String CCName;
    public String CCNo;
    public String CCYear;
    public String CVV2;

    public String Currency;

    public String MTLogId;
    public String MTVersion;

    public String MerchantCode;
    public int PaymentId;
    public String ProdDesc;
    public String RefNo;
    public String Remark;
    public String Signature;
    public String SignatureType;
    public String TerminalID;

    public String TokenId;

    public String UserContact;
    public String UserEmail;
    public String UserName;
    public String lang;

    public String xfield1;
    public String xfield2;

    @Override
    public Object getProperty(int i) {
        switch (i) {
            case 0:
                return ActionType;

            case 1:
                return Amount;
            case 2:
                return BackendURL;
            case 3:
                return BarcodeNo;

            case 4:
                return CCCId;
            case 5:
                return CCCOriTokenId;
            case 6:
                return CCMonth;
            case 7:
                return CCName;
            case 8:
                return CCNo;
            case 9:
                return CCYear;
            case 10:
                return CVV2;

            case 11:
                return Currency;

            case 12:
                return MTLogId;
            case 13:
                return MTVersion;

            case 14:
                return MerchantCode;
            case 15:
                return PaymentId;
            case 16:
                return ProdDesc;
            case 17:
                return RefNo;
            case 18:
                return Remark;
            case 19:
                return Signature;
            case 20:
                return SignatureType;
            case 21:
                return TerminalID;

            case 22:
                return TokenId;

            case 23:
                return UserContact;
            case 24:
                return UserEmail;
            case 25:
                return UserName;
            case 26:
                return lang;
            case 27:
                return xfield1;
            case 28:
                return xfield2;
            default:
                return null;
        }
    }

    @Override
    public int getPropertyCount() {
        return 29;
    }

    @Override
    public void setProperty(int i, Object obj) {
        switch (i) {
            case 0:
                ActionType = (String) obj;

            case 1:
                Amount = (String) obj;
            case 2:
                BackendURL = (String) obj;
            case 3:
                BarcodeNo = (String) obj;

            case 4:
                CCCId = (String) obj;
            case 5:
                CCCOriTokenId = (String) obj;
            case 6:
                CCMonth = (String) obj;
            case 7:
                CCName = (String) obj;
            case 8:
                CCNo = (String) obj;
            case 9:
                CCYear = (String) obj;
            case 10:
                CVV2 = (String) obj;

            case 11:
                Currency = (String) obj;

            case 12:
                MTLogId = (String) obj;
            case 13:
                MTVersion = (String) obj;

            case 14:
                MerchantCode = (String) obj;
            case 15:
                PaymentId = (int) obj;
            case 16:
                ProdDesc = (String) obj;
            case 17:
                RefNo = (String) obj;
            case 18:
                Remark = (String) obj;
            case 19:
                Signature = (String) obj;
            case 20:
                SignatureType = (String) obj;
            case 21:
                TerminalID = (String) obj;

            case 22:
                TokenId = (String) obj;

            case 23:
                UserContact = (String) obj;
            case 24:
                UserEmail = (String) obj;
            case 25:
                UserName = (String) obj;
            case 26:
                lang = (String) obj;
            case 27:
                xfield1 = (String) obj;
            case 28:
                xfield2 = (String) obj;
            default:
                break;
        }
    }

    @Override
    public void getPropertyInfo(int i, Hashtable hashtable, PropertyInfo propertyInfo) {
        propertyInfo.namespace = "http://schemas.datacontract.org/2004/07/MHPHGatewayService.Model";
        switch (i) {
            case 0:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "ActionType";
                break;

            case 1:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "Amount";
                break;
            case 2:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "BackendURL";
                break;
            case 3:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "BarcodeNo";
                break;

            case 4:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "CCCId";
                break;
            case 5:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "CCCOriTokenId";
                break;
            case 6:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "CCMonth";
                break;
            case 7:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "CCName";
                break;
            case 8:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "CCNo";
                break;
            case 9:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "CCYear";
                break;
            case 10:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "CVV2";
                break;

            case 11:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "Currency";
                break;

            case 12:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "MTLogId";
                break;
            case 13:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "MTVersion";
                break;

            case 14:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "MerchantCode";
                break;
            case 15:
                propertyInfo.type = PropertyInfo.INTEGER_CLASS;
                propertyInfo.name = "PaymentId";
                break;
            case 16:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "ProdDesc";
                break;
            case 17:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "RefNo";
                break;
            case 18:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "Remark";
                break;
            case 19:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "Signature";
                break;
            case 20:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "SignatureType";
                break;
            case 21:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "TerminalID";
                break;

            case 22:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "TokenId";
                break;

            case 23:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "UserContact";
                break;
            case 24:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "UserEmail";
                break;
            case 25:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "UserName";
                break;
            case 26:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "lang";
                break;
            case 27:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "xfield1";
            case 28:
                propertyInfo.type = PropertyInfo.STRING_CLASS;
                propertyInfo.name = "xfield2";
        }
    }


}
